home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
DJLSR111.ZIP
/
libsrc
/
c
/
dos
/
delay.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-29
|
349b
|
20 lines
#include <dos.h>
delay(unsigned msec)
{
union REGS r;
while (msec)
{
int usec;
int msec_this = msec;
if (msec_this > 4000)
msec_this = 4000;
usec = msec_this * 1000;
r.h.ah = 0x86;
r.x.cx = (usec>>16) & 0xffff;
r.x.dx = usec & 0xffff;
int86(0x15, &r, &r);
msec -= msec_this;
}
}